fontchooser: Don't cause "row-changed" signal in cell data func
authorBenjamin Otte <otte@redhat.com>
Fri, 12 Jun 2015 19:23:34 +0000 (21:23 +0200)
committerBenjamin Otte <otte@redhat.com>
Fri, 12 Jun 2015 20:04:17 +0000 (22:04 +0200)
commit8c6130e68a6e62980251cb19a0fbcd50505700f1
treeceded50a44a38e0abb7f9167d7eb7aa84cedddd4
parenta01fe140565f0af0838714daa6a99308f164d11c
fontchooser: Don't cause "row-changed" signal in cell data func

The font chooser delays creating the font description from the font face
as long as possible (it's slow). Because we use fixed height mode, we
only have to create font descriptions for rows we are actually going to
show.

This was achieved by looking at the font description column and if it
was NULL, we created a font description and gtk_list_stiore_set() it.
Unfortunately this caused a "row-changed" signal to be emitted and this
emission could happen during the cell data func.
And that caused infinite loops with accessibility when you were unlucky.

This change replaces the NULL font description with an empty one and
instead of setting the correct font description, we
pango_font_description_merge() it in. This way, the list store doesn't
change and no signals are emitted.

https://bugzilla.redhat.com/show_bug.cgi?id=1197267
gtk/gtkfontchooserwidget.c